drm/vc4: copy_to_user() returns the number of bytes remaining
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Dec 2015 12:36:28 +0000 (15:36 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
commita1a89a44b7e6ab6b698629c3103d9360a6075c02
tree392da02b00e2bca6315f8b3041d27e6dc70bac39
parent3023a5d2ccb288c6d1133f0747af23dd2130bc86
drm/vc4: copy_to_user() returns the number of bytes remaining

The copy_to/from_user() functions return the number of bytes remaining
to be copied.  We want to return error codes here.

Also it's a bad idea to print an error message if a copy from user fails
because users can use that to spam /var/log/messages which is annoying
so I removed those.

Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Gbp-Pq: Topic features/arm/rpi
Gbp-Pq: Name drm-vc4-copy_to_user-returns-the-number-of-bytes-rem.patch
drivers/gpu/drm/vc4/vc4_gem.c